package com.wanxi.test;

public class PhoneString {
    public static void main(String[] args) {
        String phone = "13456787544";
        String newPhone = "";
//        for (int i = 0; i < phone.length(); i++) {
//            char cc = phone.charAt(i);
//            if (i >= 3 && i <= 6) {
//                newPhone += "*";
////                System.out.print("*");
//            } else {
////                System.out.print(cc);
//                newPhone += cc;
//            }
//        }
        String a = phone.substring(0, 3);
        System.out.println(a);
        String b = phone.substring(7);
        System.out.println(b);
        newPhone = a + "****" + b;
        System.out.println(newPhone);

    }
}
